﻿using AutoMapper;
using Warehouse.Api.Write.AllCation.Command.Breakage;
using Warehouse.Api.Write.AllCation.Command.Checksheet;
using Warehouse.Api.Write.AllCation.Command.Shifing;
using Warehouse.Api.Write.AllCation.Command.Stoking;
using Warehouse.Api.Write.AllGCotion.Command;
using Warehouse.Api.Write.AllGCotion.Hanlder;
using Warehouse.Domian;
using Warehouse.Domian.Model;

namespace Warehouse.Api.Write
{
    /// <summary>
    /// 仓库的AutoMapper配置文件
    /// </summary>
    public class AutoMapperFiles : Profile
    {
        public AutoMapperFiles()
        {
            //添加出入库的信息
             CreateMap<AddStockingCommand, Stocking>().ReverseMap();
            //更新出入库的信息
            CreateMap<UpdaetStockingCommand, Stocking>().ReverseMap();
            //添加报废信息
            CreateMap<AddBreakageCommand, Breakage>().ReverseMap();
            //更新报废信息
            CreateMap<UpdateBreakageCommand, Breakage>().ReverseMap();
            //添加移库信息
            CreateMap<AddShiftingCommand, Shifting>().ReverseMap();
            //更新移库信息
            CreateMap<UpdateShiftingCommand, Shifting>().ReverseMap();
            //添加盘点信息
            CreateMap<AddChecksheetCommand,Checksheet>().ReverseMap();
            //更新盘点信息
            CreateMap<UpdaetChecksheetCommand, Checksheet>().ReverseMap();
            //添加盘点信息
            CreateMap<AccountModelCommand, AccountModel>();
            //
            CreateMap<AddBasicCommand, Basicinformatio>();
            
            CreateMap<AddInventoryCommandHanlder, InventoryModel>();

        }
    }
}
